package org.dizem.util;

import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * User: dizem@126.com
 * Time: 11-6-21 上午11:34
 */
public class SpringUtil {
	private static AbstractApplicationContext ctx =
			new ClassPathXmlApplicationContext("applicationContext.xml");

	private SpringUtil() {
	}

	public static AbstractApplicationContext getContext() {
		return ctx;
	}

	public static Object getBean(String name) {
		return ctx.getBean(name);
	}

	public static void main(String[] args) {
		getContext();
	}
}
